<extend name="Public/base" />
<block name="body">
    <style>
        .Productlist li{
            width: 150px; padding-right: 20px;
            margin-top: 20px;
        }
        .panel-body{
            min-height:500px;
        }
    </style>
    <div class="main-title" style="padding-bottom: 10px;">
        <h2> <span style='color: red;'>{$shopId|get_sp_shop_name}</span> 门店进货操作</h2>
    </div>
    <div class="cf">
        <div class="fl">

        </div>
        <!-- 高级搜索 -->
        <div class="search-form fr cf">
        </div>
    </div>


    <div class="row" ng-controller="SpBookproductCtrl">
        <div class="col-md-3">
            <!------订货单--->
            <div class="panel panel-default">
                <div class="panel-heading">订货单创建</div>
                <div class="panel-body">
                
                    <table class="table table-striped">
                        <tr>
                            <th>请求配送的商品</th>
                            <th>数量</th>
                            <th>小计</th>
                              <th></th>
                        </tr>
                        <tr ng-repeat="caigou in CaigouList">
                            <td ng-bind="caigou.pname"></td>
                            <td ng-bind="caigou.number"></td>
                            <td ng-bind="caigou.amountprice"></td>       
                            <td ><i class='glyphicon glyphicon-minus' ng-click="minusNumber($index)"></i></td>
                        </tr>
                       
                    </table>

                    <table width='100%'>
                         <tr>
                            <td colspan='3'>
                                备注：
                                <textarea ng-model="remark" style='width:100%'></textarea>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                总数：<span ng-bind="totalLeixing"></span><br/>
                                总额：￥<span ng-bind="totalAmount"></span>
                            </td>
                            <td ><button type="button" class="btn btn-primary btn-lg" ng-click='creatBookproduct({$shopId})'>提交订货请求</button></td>
                        </tr>
                    </table>
                  
                </div>
            </div>
        </div>
        <div class="col-md-9">
            <div class="panel panel-default">
                <div class="panel-heading">
                <ul class="nav nav-pills" role="tablist">
                    <volist name='_pcategorylist' id='vo'>
                        <li role="presentation"><a href="#" data-pcategoryid='{$vo.id}' ng-click="fenleiClick({$vo.id})">{$vo.name} </a></li>
                    </volist>                 
                  </ul>
                </div>
                <div class="panel-body" >
                    <ul class="nav nav-pills Productlist " role="tablist">
                        <li  role="presentation" class="active" ng-repeat="product in ProductList" ng-click="addProduct(product.id,product.name,product.instockPrice)"><a href="#"><span ng-bind="product.name"></span>  <span ng-bind="product.cnt" class="badge"></span><br/>
                                ￥<span   ng-bind="product.instockPrice"></span>  </a>
                        </li>  
                    </ul>
                </div>
            </div>
        </div>
    </div>
</block>

<block name="script">
    <script type="text/javascript" src="__JS__/angularjs/SpBookproduct/bookprodutc.js"></script>.
    <script type="text/javascript">
        //搜索查询
        $('#submit').click(function () {
            document.getElementById("form-search").submit()
        });
        //导航高亮
        highlight_subnav('{:U('SpBookproduct/addindex')}');
    </script>
</block>

  